<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="keywords" content="动力金融网，动力金融，动力金融财富,金元宝，金元宝，网络理财，个人理财，投资理财，P2P理财，互联网金融，投资理财，债权转让，理财，网络贷款，个人贷款，理财服务，网贷，小额贷款，网络投融资平台, 网络理财,固定收益,100%本息保障" />
<meta name="description" content="动力金融网用户注册，专业的互联网金融信息服务平台"/>
<title>登录动力金融网-动力金融网,专业的互联网金融信息服务平台</title>
<link rel="stylesheet" type="text/css" th:href="@{/css/style.css}"/>
<script language="javascript" type="text/javascript" th:src="@{/js/jquery-1.7.2.min.js}"></script>
<script language="javascript" type="text/javascript" th:src="@{/js/jQuery.md5.js}"></script>
<script type="text/javascript" th:src="@{/js/leftTime.min.js}"></script>
<script language="javascript" type="text/javascript" th:src="@{/js/login.js}"></script>

    <style type="text/css">
        .testBtn-a{display: inline-block;height:40px;line-height:30px;padding:0 8px; border:0; border-radius:0px;color:#fff;background:rgb(65,133,244);cursor: pointer;}
        .testBtn-a.on{background:#c9c9c9;color:#666;cursor: default;}
    </style>

</head>

<body>
<!--页头start-->
<div id="header">
    <div th:include="commons/header :: html"></div>
</div>
<!--页头end-->

<div class="login-body">
  <div class="mainBox">
    <div class="homeWap">
      <div class="login-cnt clearfix">
        <div class="login-form">
		     <h2>欢迎登录</h2>
		     
		     <div class="login-box clearfix" style="z-index:10;">
		     <label>账号</label>
		     	<input id="phone" name="phone" type="text" class="input_text" placeholder="请输入11位手机号码" maxlength="11"/>
		     </div>
		     
		     <div class="login-box clearfix" style="z-index:8; padding-bottom:0px;">
		     <label>密码</label>
		     	<input id="loginPassword" name="loginPassword" type="password" placeholder="请输入登录密码" class="input_text" maxlength="16"/>
		     </div>


            <!-- 获取验证码 -->
            <div class="login-yzm">
                <div class="yzm-box">
                    <input id="messageCode" type="text" class="yzm" placeholder="获取短信验证码"/>
                    <button type="button" class="testBtn-a" id="messageCodeBtn">获取验证码</button>
                </div>
                <span id="messageCodeOk" class="ok" style="display:none;"></span>
                <div id="messageCodeErr" class="form-hint" style="display:none;"></div>
            </div>
		     <div class="bn-login" id="loginId"><button onclick="Login()">登&nbsp;&nbsp;录</button></div>
    	</div>
    	
        <div class="login-right">
          <div class="login-boy"></div>
          <div class="top-txt">
		          动力金融网，便捷的投资平台
			<br/><br/>
			加入动力金融网<br/>坐享12.7%历史年化收益
          </div>
           
          <div class="currently">
          	平台用户数：<span id="user">--</span>位，累计成交额： <span id="gold">--</span>元
          </div>
          
          <div class="bn-reg" id="quickRegBtn">
          </div>
          
           <ul class="clearfix">
            <li><i></i>
              <h3>优选投资计划</h3>
              <p>
              	历史年化收益<span>12.7%</span><br/> 投资周期<span>1-12月</span>灵活选择
              </p>
            </li>
            <li class="jpsb"><i></i>
              <h3>优质借款</h3>
              <p>
              	投资周期短<br/>安全计划
              </p>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</div>

<!--页脚start-->
<div th:include="commons/footer :: html"></div>
<!--页脚end-->

<script type="text/javascript">
    function Login() {
        var phone = $.trim($("#phone").val());
        var loginPassword = $.trim($("#loginPassword").val());
        var messageCode = $.trim($("#messageCode").val());
        $.ajax({
            url:"/p2p/loan/login",
            type:"get",
            data:{
                "phone" : phone,
                "loginPassword" : $.md5(loginPassword),
                "messageCode" : messageCode
            },
            success:function (data) {
                if (data.code == 1) {
                    // 登录成功，跳转到首页
                    window.location.href = "/p2p/index"
                } else {
                    alert(data.message)
                    // 登录失败请求账号密码验证码
                    $("#phone").val("");
                    $("#loginPassword").val("");
                    $("#messageCode").val("");
                }
            },
            error:function () {
                alert("系统繁忙")
            }
        })
    }
</script>

</body>
</html>